/*
 * Copyright 2013 Stanley Shyiko
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package beautiful.butterfly.drds.binlog.type;


/**
 * @author <a href="mailto:stanley.shyiko@gmail.com">Stanley Shyiko</a>
 * @see <a href="http://dev.mysql.com/doc/internals/en/text-protocol.html">Text
 * Protocol</a> for the original documentation.
 */
public enum CommandType
{

    /**
     * internal server command.
     */
    sleep, /**
 * used to inform the server that client wants to close the
 * connection.
 */
quit, /**
 * used to change the default schema of the connection.
 */
init_db, /**
 * used to send the server a text-based query that is executed
 * immediately.
 */
query, /**
 * used to get column definitions of the specific tablename.
 */
field_list, /**
 * used to create new schema.
 */
create_db, /**
 * used to drop existing schema.
 */
drop_db, /**
 * a low-level version of several flush ... and reset ...
 * commands.
 */
refresh, /**
 * used to shutdown the mysql-server.
 */
shutdown, /**
 * used to get a human readable string of internal statistics.
 */
statistics, /**
 * used to get a list of active threads.
 */
process_info, /**
 * internal server command.
 */
connect, /**
 * used to ask the server to terminate the connection.
 */
process_kill, /**
 * triggers a dump on internal debug info to stdout of the
 * mysql-server.
 */
debug, /**
 * used to check if the server is alive.
 */
ping, /**
 * internal server command.
 */
time, /**
 * internal server command.
 */
delayed_insert, /**
 * used to change user of the current connection and reset
 * the connection state.
 */
change_user, /**
 * requests a binary log network stream from the master
 * starting a given position.
 */
binlog_dump, /**
 * used to dump a specific tablename.
 */
table_dump, /**
 * internal server command.
 */
connect_out, /**
 * registers a slave at the master. should be sent before
 * requesting a binary log events with {@link #binlog_dump}.
 */
register_slave, /**
 * creates a prepared statement from the passed query
 * string.
 */
stmt_prepare, /**
 * used to execute a prepared statement as identified by
 * statement id.
 */
stmt_execute, /**
 * used to send some data for a column.
 */
stmt_send_long_data, /**
 * deallocates a prepared statement.
 */
stmt_close, /**
 * resets the data of a prepared statement which was accumulated
 * with {@link #stmt_send_long_data} commands.
 */
stmt_reset, /**
 * allows to enable and disable
 * {@link com.github.shyiko.mysql.binlog.network.clientcapabilities#multi_statements}
 * for the current connection.
 */
set_option, /**
 * fetch a row from a existing resultset after a
 * {@link #stmt_execute}.
 */
stmt_fetch, /**
 * internal server command.
 */
daemon, /**
 * used to request the binary log network stream based on a gtid.
 */
binlog_dump_gtid

}
